package com.mall.biz.mallRecommend;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mall.client.mallRecommend.MallRecommendService;
import com.mall.pojo.MallRecommend;
import com.mall.pojo.MallRecommendExample;
import com.mall.pojo.MallRecommendExample.Criteria;

@Service
public class MallRecommendBizImpl {
	@Autowired
	private MallRecommendService mallRecommendService;
	
	
	/**
	 * 获得相应条件的eshop店铺
	 * @param mallCommendExample
	 * @return
	 */
	public List<MallRecommend> getEshopMallRecomendList(Integer recommendType,Integer onlyKey){
		MallRecommendExample mallCommendExample = new MallRecommendExample();
		mallCommendExample.setOrderByClause("attribute desc");
		Criteria criteria = mallCommendExample.createCriteria();
		criteria.andTypeEqualTo(recommendType);
		criteria.andCommOnlyKeyEqualTo(onlyKey);
		return this.mallRecommendService.getMallRecommendListByMallCommendExample(mallCommendExample);
	}
}
